import React from 'react'
import {Image, ScrollView, Text, View} from "react-native";
import WingBlank from "@ant-design/react-native/es/wing-blank/index";
import Flex from "@ant-design/react-native/es/flex/Flex";
import WhiteSpace from "@ant-design/react-native/es/white-space/index";
import Button from "@ant-design/react-native/es/button/index";

const item = {
  orderNumber: '123123123',
  contact: '张三',
  phone: '12368900',
  carName: '重型吊车',
  enterDemand: '会抖',
  checkWay: '现场结账',
  isReceipt: '是',
  remark: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
  projectTime: 3,
  number: 3,
  projectPrice: 3000,
  projectName: '水立方项目',
  address: '陕西省西安市',
}

export default class GrabOrder extends React.Component {
  state = {
    value: ''
  }


  render() {
    return <ScrollView>
        <Flex style={{height: 100, marginVertical: 10, padding: 10, backgroundColor: '#fff'}}>
          <View style={{width: '40%'}}>
            <Image source={{uri: 'https://org.modao.cc/uploads4/images/3133/31336283/v2_pnxd2q.png'}}
                   style={{height: 80}}/>
          </View>
          <WingBlank size="lg">
            <View><Text>我是大富翁</Text></View>
            <WhiteSpace/>
            <View><Text>17868803265</Text></View>
          </WingBlank>
        </Flex>
        <WhiteSpace/>
        <View style={{backgroundColor: '#fff', height: '100%', padding: 20}}>
          <Flex direction='row' justify="between">
            <Text style={{color: 'orange'}}>抢单人数 4</Text>
            <Text>进行中</Text>
          </Flex>
          <WhiteSpace size={'lg'}/>
          <View>
            <Text>订单编号:{item.orderNumber}</Text><WhiteSpace/>
            <Text>设备：{item.carName}</Text><WhiteSpace/>
            <Text>数量：{item.number}台</Text><WhiteSpace/>
            <Text>工时：{item.projectTime}小时</Text><WhiteSpace/>
            <Text>工价：{item.projectPrice}/小时/台</Text><WhiteSpace/>
            <Text>项目信息：{item.projectName}</Text><WhiteSpace/>
            <Text>施工地址：{item.address}</Text><WhiteSpace/>
            <Text>项目联系人：{item.contact}</Text><WhiteSpace/>
            <Text>电话：{item.phone}</Text><WhiteSpace/>
            <Text>进场要求：{item.enterDemand}</Text><WhiteSpace/>
            <Text>结账方式：{item.checkWay}</Text><WhiteSpace/>
            <Text>是否开发票：{item.isReceipt}</Text><WhiteSpace/>
            <Text>备注：{item.remark}</Text><WhiteSpace size={'lg'}/>

            <Button type='primary'>立即抢单</Button>
          </View>

        </View>
      </ScrollView>
  }
}